<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //三元表达式：条件表达式？表达式1：表达式2,条件表达式为真则返回表达式1否则返回表达式2
      /*   var num = 5;
        var result = num > 5 ? '是的' : '不是';
        console.log(result)*/
        var num = prompt('输入0~59的数字');
        str = num < 10 ? '0' + num : num;
        alert(str);
    </script>
</head>
<body>
    
</body>
</html>